package com.zzy.model;

public class GroupModel {
    private String groupId;
    private String groupName;
    private double num;

    public GroupModel(){

    }

    public GroupModel(String groupId,String groupName,double num){
        this.groupId = groupId;
        this.groupName = groupName;
        this.num = num;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public double getNum() {
        return num;
    }

    public void setNum(double num) {
        this.num = num;
    }

    public boolean equals(Object o){
        if(this==o){
            return  true;
        }
        if(o==null || getClass()!=o.getClass()){
            return  false;
        }
        GroupModel g = (GroupModel)o;
        if(g.getGroupId().equals(groupId) && g.getGroupName().equals(groupName) && g.getNum()==num){
            return true;
        }
        return false;
    }

    @Override
    public int hashCode(){
        int result =  groupId.hashCode() + getGroupName().hashCode();
        return result;
    }

    public String toString(){
        return "{groupId:" +this.groupId +  " groupName:" +this.groupName + " num:" +this.num +" }";
    }


}
